#{extends 'relationsHome.html' /}
#{set title:'Home' /}
#{set 'moreStyles'}
<link rel="stylesheet" href="@{'/public/stylesheets/forms.css'}">
<link rel="stylesheet" href="@{'/public/stylesheets/css3buttons.css'}"
	media="screen">

#{/set}

<form action="@{Relations.addEntitiesRelation()}" method="POST">
<br/>
<tr><td><b>Entities Relation Creation</b><hr></hr></td></tr>

<p>
Source
#{if entity.size() > 0 }
#{select 'source', value:1, id:'select1'}
   #{option None}None#{/option}
    #{list items:0..entity.size()-1, as:'i'}
      #{option entity.get(i).entityName}${entity.get(i).entityName}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Entities
#{/else}
				
</p>

<p>
Name
#{if task.size() > 0 }
    #{select 'relationName', value:1, id:'select2'}
    #{option None}None#{/option}
    #{list items:0..task.size()-1, as:'i'}
    #{option task.get(i).relationName} ${task.get(i).relationName} #{/option}
    #{/list}
    #{/select}
#{/if}
#{else}
    No Relation Names
#{/else}
</p>

<p>	
Destination		
#{if entity.size() > 0 }
#{select 'destination', value:1, id:'select3'}
      #{option None}None#{/option}
    #{list items:0..entity.size()-1, as:'i'}
      #{option entity.get(i).entityName}${entity.get(i).entityName}#{/option}
    #{/list}
#{/select}
#{/if}
#{else}
    No Entities
#{/else}
</p>

			
#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}

<tr><td>&nbsp;</td><td><input type="submit" value="Add">

</form>

